package com.app.service.impl;

import com.app.mapper.EnterpriseAlbumMapper;
import com.app.mapper.EnterpriseMapper;
import com.app.model.CusResumeLangModel;
import com.app.model.EnterpriseAlbumModel;
import com.app.model.EnterpriseModel;
import com.app.service.EnterpriseAlbumService;
import com.app.service.EnterpriseService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @Description:公司图集实现类
 * @Author: N
 * @Date: 2022年11月24日 10点29分
 */
@Service
public class EnterpriseAlbumServiceImpl implements EnterpriseAlbumService {
@Autowired
    EnterpriseAlbumMapper enterpriseAlbumMapper;
    @Override
    public List<EnterpriseAlbumModel> getListByComId(int comId) {
        QueryWrapper<EnterpriseAlbumModel> queryWrapper = new QueryWrapper<>();
        queryWrapper.select().eq("com_id",comId);
        List<EnterpriseAlbumModel> userList = enterpriseAlbumMapper.selectList(queryWrapper);
        if(userList.isEmpty())
        {
            return null;
        }else {
            return userList;
        }
    }

    @Override
    public int insert(EnterpriseAlbumModel model) {
        return enterpriseAlbumMapper.insert(model);
    }
}
